The invention relates to displaying images.
A typical computer system has a display screen based on cathode-ray tube technology or liquid-crystal display technology and driven by display signals generated by the computer system. The display screen consists of multiple discrete display elements called xe2x80x9cpixelsxe2x80x9d, organized in industry-standard combinations of columns and rows, such as 800 columns and 600 rows, or 1024 columns and 768 rows.
What appears on the display screen is controlled by a display memory provided by the computer system. Color information for each display element is stored in the display memory. The size of the display memory defines the number of different colors able to be specified for each display element. For example, if the display memory allocates 4 bits per display element (known as a xe2x80x9ccolor depthxe2x80x9d of 4), any one of sixteen different colors may be specified for each display element. Other common color depths are 8, 15, 16, and 24, allowing the specification of any one of 256, 32768, 65536, and 16777216 colors, respectively. In some cases, a color depth of 32 is used to allow the specification of not only any one of 16777216 colors but also other information such as 8-bit alpha channel information to facilitate composite layering and other effects.
The display signals that drive the display screen are derived from the display memory""s color information, typically by a display screen controller provided by the computer system.
Enlarging an image on the display screen is accomplished by software (such as drawing or painting software) running on the computer system. For example, the Opainting software may allow an end-user of the computer system to display a photograph on the display screen. In such a case, the painting software may also allow the end-user to cause a portion of the photograph to be enlarged on the display screen. To do so, the end-user selects the portion with a pointing device and then uses the pointing device or a keyboard to issue an xe2x80x9cenlarge imagexe2x80x9d command to the painting software. The painting software then xe2x80x9cre-drawsxe2x80x9d the selected portion in a larger size, by causing changes to the contents of the display memory. For instance, if the photograph includes an image of an eye, and the end-user selects the eye image for enlargement, the painting software causes more of the display memory to be used for displaying the eye image. In such a case, if the eye image originally used a display memory portion corresponding to 7500 display elements (i.e., 75 rows of 100 display elements each), the enlarged eye image uses a larger display memory portion corresponding to, e.g., 30,000 display elements (i.e., 150 rows of 200 display elements each). Subsequently returning the eye image to its original size requires more changes to the display memory.
Because the painting software is running on the computer system, the changes to the display memory involve processing by the computer system""s main processor (which may include two or more processor units executing in parallel). Typically, the computer system""s main processor is also used for performing other tasks in the computer system, such as saving and loading computer files, calculating numbers, and performing operating system functions. Consequently, depending on whether the main processor is busy performing one or more of the other tasks, the changes to the display memory may not be performed in real-time. For instance, the end-user may expect the image to be enlarged to be updated 30 times per second (e.g., to produce the effect of fluid motion). In such a case, the main processor may be too burdened by the other tasks to be able to keep up, and may be able to cause enlarged images to be produced at a rate of only 20 times per second, for example.
The invention provides a method and a device for use in displaying a scaled version of an image on a display screen of a computer system. Special-purpose display circuitry, specifically an image scaler, is provided. The image scaler allows the scaled version to be produced without burdening a main processor of the computer system. Because production of the scaled version is hardware-based, the scaled version can be displayed on the display screen (and subsequently can be removed) nearly instantaneously at the direction of an end-user of the computer system. Consequently, the scaled version can be updated in real-time as the image is updated, such as when the image is updated 30 times per second to produce a full-motion effect.
In addition, input from the end-user is intercepted to allow characteristics of the scaled version (such as the scaled version""s position) to be based on the input. Consequently, for example, the image to be scaled can be selected in response to movement of a pointing device by the end-user. Intercepting the input allows the scaled version to operate as an end-user-maneuverable xe2x80x9cmagnifying glassxe2x80x9d atop the display screen, i.e., as an enlargement of a portion of a visual display on the display screen, where the enlargement is provided in a window that moves and is updated correspondingly in response to input from the pointing device.
The invention features storing in a display memory, original image data representing an original version of the image, and, based on the original image data and an image scaler, producing a data stream representing a scaled version of the image, while leaving at least a portion of the original image data intact.
Implementations of the invention may include one or more of the following features. The data stream may be updated in real-time to take into account changes made to the original image data. The scaled version of the image may be an enlarged version, a reduced version, or a full-screen version of the image.
Based on the data stream, a display signal may be generated for displaying the scaled image in a window on the display screen. The display signal may be configured to allow the window to obscure the original version of the image.
Based on the original image data, another data stream may be produced. This other data stream may represent the original version of the image. Based on the two data streams, a display signal may be generated for displaying the scaled image in a window on the display screen. The two data streams may be switched between while the display signal is generated. The switching may be based on the contents of at least one of the streams or on an arithmetic logic unit.
The data stream may reflect a horizontal scaling factor that is different from a vertical scaling factor. The original image data may include color information for the image, and the data stream may include duplicates of a piece of the color information.
Input signals to the computer system may be intercepted, and the data stream may be based on the input signals. Initiating production of the data stream may be based the input signals.
The method may also include determining a pointer position for a pointer of a pointing device and basing the data stream on the pointer position. The pointer position may be mapped to a logical pointer position corresponding to the original image data.
A display signal generator (such as a digital-to-analog converter) may be connected to use the data stream to produce a signal for displaying the scaled version on the display screen. A multiplexor may be connected to pass the data stream to the display signal generator, and may be connected to switch between passing the data stream and another data stream representing the original version. An arithmetic logic unit may be connected to affect the passing of the data stream to the display signal generator. A Peripheral Component Interconnect (xe2x80x9cPCIxe2x80x9d) or Industry Standard Architecture (xe2x80x9cISAxe2x80x9d) plug-in card may include the image scaler.